package br.com.simulador.session;

import br.com.simulador.model.*;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityHome;

@Name("configHome")
public class ConfigHome extends EntityHome<Config> {

	public void setConfigId(Long id) {
		setId(id);
	}

	public Long getConfigId() {
		return (Long) getId();
	}

	@Override
	protected Config createInstance() {
		Config config = new Config();
		return config;
	}

	public void load() {
		if (isIdDefined()) {
			wire();
		}
	}

	public void wire() {
		getInstance();
	}

	public boolean isWired() {
		return true;
	}

	public Config getDefinedInstance() {
		return isIdDefined() ? getInstance() : null;
	}

}
